package com.wuzihao.disk.share.control;


import com.wuzihao.disk.menu.exception.MenuOccupyException;
import com.wuzihao.disk.mybatis.flexigrid.PagingEntity;
import com.wuzihao.disk.mybatis.ztree.ZtreeEntity;
import com.wuzihao.disk.share.ShareService;
import com.wuzihao.disk.share.entity.ShareEntity;
import com.wuzihao.disk.share.service.impl.ShareServiceImpl;
import com.wuzihao.disk.spring.control.BaseController;
import com.wuzihao.disk.user.exeption.UserOccupyException;
import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.xml.transform.Result;
import java.util.List;

@Controller
@RequestMapping("/share")
public class ShareController extends BaseController {
//    @Resource
//    private ShareService shareService;
//
//    @Secured("SHARE_cldk_data_share")
//    @RequestMapping("/sharePage")
//    public String sharePage() {
//        return "share/sharePage";
//    }
//    @Secured("SHARE_cldk_data_share_del")
//    @RequestMapping("/deleteShareByIds")
//    @ResponseBody
//    public String deleteShareByIds(@RequestParam("ids") String ids) {
//        try {
//            shareService.deleteShareByIds(ids);
//        } catch (UserOccupyException e) {
////            e.printStackTrace();
//            return failJson("share.allocate.user.fail", e.getMessage());
//        } catch (MenuOccupyException e) {
//            return failJson("share.allocate.menu.fail", e.getMessage());
////            e.printStackTrace();
//        }
//        return successJson("share.delete.success");
//    }
}